<?php
class App_Module_Admin_Component_Cfg_Tpl_Web extends App_Module_Admin_Tpl_Block_Editform
{
	protected $_showDefined = true;

	public function Form(Mozg_Property_Params $obj)
	{
		$this->_form = $obj->Config()->GetPath();
		return parent::Form($obj);
	}

    public function OutCfg($id, $data)
    {
    	$this->id = $id;
    	$this->data = $data;

		return $this->CreateForm($data);
    }

    public function SubmenuBlock($id, $idParts, $subFields)
    {
        $this->id = $id;
  		$this->idParts = $idParts;
        $this->fields = $subFields;

        return $this->GetTpl('Base')->LeftBlock(Mozg_Lang::_('CONFIG_CATEGORIES'), $this->render('cfg/_submenu.phtml'));
    }

	protected function GetActionUrl()
	{
		return array('module' => 'admin', 'ctrl' => 'cfg', 'action' => 'save', 'id' => $this->id);
	}

	protected function GetHeaderTitle()
	{
		return Mozg_Lang::_($this->Form($this->data)->GetTitle());
	}

	protected function GetNewFieldUrl()
	{
		return array('module' => 'admin', 'ctrl' => 'cfg', 'action' => 'newfield');
	}
}